MODULE	'exec/semaphores',
			'graphics/gfxnodes',
			'graphics/monitor'

CONST	GENLOCK_VIDEO=2,
		V_LACE=4,
		V_DOUBLESCAN=8,
		V_SUPERHIRES=$20,
		V_PFBA=$40,
		V_EXTRA_HALFBRITE=$80,
		GENLOCK_AUDIO=$100,
		V_DUALPF=$400,
		V_HAM=$800,
		V_EXTENDED_MODE=$1000,
		V_VP_HIDE=$2000,
		V_SPRITES=$4000,
		V_HIRES=$8000,
		EXTEND_VSTRUCT=$1000,
		VPF_A2024=$40,
		VPF_TENHZ=16,
		VPB_A2024=6,
		VPB_TENHZ=4

OBJECT ColorMap
	Flags:CHAR,
	Type:CHAR,
	Count:UWORD,
	ColorTable:LONG,
	VPE:PTR TO ViewPortExtra,
	LowColorBits:LONG,
	TransparencyPlane:CHAR,
	SpriteResolution:CHAR,
	SpriteResDefault:CHAR,
	AuxFlags:CHAR,
	VP:PTR TO ViewPort,
	NormalDisplayInfo:LONG,
	CoerceDisplayInfo:LONG,
	Batch_Items:PTR TO TagItem,
	VPModeID:LONG,
	PalExtra:PTR TO PaletteExtra,
	SpriteBase_Even:UWORD,
	SpriteBase_Odd:UWORD,
	Bp_0_Base:UWORD,
	Bp_1_Base:UWORD

CONST	CM_TRANSPARENYPLANE=16,
		COLORMAP_TYPE_V1_2=0,
		COLORMAP_TYPE_V1_4=1,
		COLORMAP_TYPE_V36=1,
		COLORMAP_TYPE_V39=2,
		COLORMAP_TRANSPARENCY=1,
		COLORPLANE_TRANSPARENCY=2,
		BORDER_BLANKING=4,
		BORDER_NOTRANSPARENCY=8,
		VIDEOCONTROL_BATCH=16,
		USER_COPPER_CLIP=$20,
		BORDER_SPRITES=$40,
		CMF_CMTRANS=1,
		CMF_CPTRANS=2,
		CMF_BRDRBLNK=4,
		CMF_BRDNTRAN=8,
		CMF_BRDRSPRT=$40,
		CMB_CMTRANS=0,
		CMB_CPTRANS=1,
		CMB_BRDRBLNK=2,
		CMB_BRDNTRAN=3,
		CMB_BRDRSPRT=6,
		SPRITERESN_ECS=0,
		SPRITERESN_140NS=1,
		SPRITERESN_70NS=2,
		SPRITERESN_35NS=3,
		SPRITERESN_DEFAULT=-1,
		CMAF_FULLPALETTE=1,
		CMAB_FULLPALETTE=0,
		CMAF_NO_INTERMED_UPDATE=2,
		CMAB_NO_INTERMED_UPDATE=1,
		CMAF_NO_COLOR_LOAD=4,
		CMAB_NO_COLOR_LOAD=2,
		CMAF_DUALPF_DISABLE=3,
		CMAB_DUALPF_DISABLE=8

OBJECT PaletteExtra
	Semaphore:SS,
	FirstFree:UWORD,
	NFree:UWORD,
	FirstShared:UWORD,
	NShared:UWORD,
	RefCnt:LONG,
	AllocList:LONG,
	ViewPort:PTR TO ViewPort,
	SharableColors:UWORD

CONST	PRECISION_EXACT=-1,
		PRECISION_IMAGE=0,
		PRECISION_ICON=16,
		PRECISION_GUI=$20,
		OBP_Precision=$84000000,
		OBP_FailIfBad=$84000001,
		PEN_EXCLUSIVE=1,
		PEN_NO_SETCOLOR=2,
		PENF_EXCLUSIVE=1,
		PENF_NO_SETCOLOR=2,
		PENB_EXCLUSIVE=0,
		PENB_NO_SETCOLOR=1

OBJECT ViewPort
	Next:PTR TO ViewPort,
	ColorMap:PTR TO ColorMap,
	DspIns:PTR TO CopList,
	SprIns:PTR TO CopList,
	ClrIns:PTR TO CopList,
	UCopIns:PTR TO UCopList,
	DWidth:INT,
	DHeight:INT,
	DXOffset:INT,
	DYOffset:INT,
	Modes:UWORD,
	SpritePriorities:CHAR,
	ExtendedModes:CHAR,
	RasInfo:PTR TO RasInfo

OBJECT View
	ViewPort:PTR TO ViewPort,
	LofCprList:PTR TO CprList,
	ShfCprList:PTR TO CprList,
	DYOffset:INT,
	DXOffset:INT,
	Modes:UWORD

OBJECT ViewExtra
	XLN:XLN,
	View:PTR TO View,
	Monitor:PTR TO MonitorSpec,
	TopLine:UWORD

OBJECT ViewPortExtra
	XLN:XLN,
	ViewPort:PTR TO ViewPort,
	DisplayClip:Rectangle,
	VecTable:LONG,
	DriverData[2]:LONG,
	Flags:UWORD,
	Origin[2]:TPoint,
	Cop1Ptr:LONG,
	Cop2Ptr:LONG

CONST	VPXB_FREE_ME=0,
		VPXF_FREE_ME=1,
		VPXB_VP_LAST=1,
		VPXF_VP_LAST=2,
		VPXB_STRADDLES_256=4,
		VPXF_STRADDLES_256=16,
		VPXB_STRADDLES_512=5,
		VPXF_STRADDLES_512=$20

OBJECT RasInfo
	Next:PTR TO RasInfo,
	BitMap:PTR TO BitMap,
	RXOffset:INT,
	RYOffset:INT

CONST	MVP_OK=0,
		MVP_NO_MEM=1,
		MVP_NO_VPE=2,
		MVP_NO_DSPINS=3,
		MVP_NO_DISPLAY=4,
		MVP_OFF_BOTTOM=5,
		MCOP_OK=0,
		MCOP_NO_MEM=1,
		MCOP_NOP=2

OBJECT DBufInfo
	Link1:LONG,
	Count1:LONG,
	SafeMessage:MN,
	UserData1:LONG,
	Link2:LONG,
	Count2:LONG,
	DispMessage:MN,
	UserData2:LONG,
	MatchLong:LONG,
	CopPtr1:LONG,
	CopPtr2:LONG,
	CopPtr3:LONG,
	BeamPos1:UWORD,
	BeamPos2:UWORD
